package com.test.mylotterysystem.service.serviceEnum;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum ActivityPrizeTiersEnum {
    FIRST(1, "一等奖"),
    SECOND(2, "二等奖"),
    THIRD(3, "三等奖"),
    ;
    private Integer code;
    private String status;

    public static ActivityPrizeTiersEnum forName(String name) {
        for (ActivityPrizeTiersEnum value : ActivityPrizeTiersEnum.values()) {
            if (value.name().equalsIgnoreCase(name)) {
                return value;
            }
        }
        return null;
    }
}
